using System;
using System.Windows.Controls;
using Phoenix.Frames;
using Phoenix.Framework;

namespace Phoenix.ActionResults
{
    public class PageActionResult : ViewActionResult
    {
        public PageActionResult(string actionName, ViewModelBase viewModel, ControllerActionContext context) :
            base(actionName, viewModel, context)
        {
        }

        protected override void RenderView(Control view)
        {
            TargetFrame.NavigateTo(new NavigationRequest(Context.ControllerAction, Context.Parameters, view, Context.RequestState, Context.Options));
        }
    }
}